<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
/* 3 líneas que habilitan la documentación de cakephp en netbeans (para las vistas) */

/* @var $this View */
/* @var $html HtmlHelper */
/* @var $javascript JavascriptHelper */
?>
<!DOCTYPE html>
<html>

    <head>
        <?php echo $this->Html->charset(); ?>
        <title>
            MasterPizza
        </title>
        <?php
        echo $this->Html->meta('icon');

        //echo $this->Html->css('cake.generic'); //Deshabilitamos CSS de cake pues entra en conflicto con Css de bootstrap

        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');

        echo $this->Html->script('jquery-1.9.1.min'); // Include jQuery library
        echo $this->Html->script('bootstrap.min'); // Include bootstrap library
        echo $this->Html->css('bootstrap.min'); //Include bootstrap css
        echo $this->Html->css('masterpizza')
        ?>
    </head>

    <body>
        <div id="container" class="container">

            <div id="header">
                <div class="navbar">
                    <div class="navbar-inner">
                        <a class="brand" href="#">Masterpizza</a>
                        <ul class="nav">
                            <li class=""><?php echo $this->Html->link("Inicio",array('controller'=>'index','action'=>'index'))?></li>


                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Opciones
                                    <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><?php echo $this->Html->link("Estado turno",array('controller'=>'turno','action'=>'index'))?></li>
                                    <li><?php echo $this->Html->link("Familias de productos",array('controller'=>'familiaproducto','action'=>'index'))?></li>
                                </ul>
                            </li>
                            
                            <?php if ($authUser) { ?>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $authUser['username']; ?>
                                    <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><?php echo $this->Html->link("Cerrar sesión",array('controller'=>'users','action'=>'logout'))?></li>
                                    
                                </ul>
                            </li>
                            <?php } ?>
                            
                            
                        </ul>

                    </div>
                </div>
            </div>

            <div id="content">
                <?php echo $this->Session->flash(); ?>

                <?php echo $this->fetch('content'); ?>
            </div>

            <div id="footer">

            </div>

        </div>

        <?php
        //echo $this->element('sql_dump'); 
        //Se deshabilita para correcto funcionamiento de DebugKit
        ?>

        <?php echo $this->Js->writeBuffer(); ?>
    </body>

</html>